home *** CD-ROM | disk | FTP | other *** search
- /*
- makemak.c --
-
- This program will generate a make file suitable for use
- with Microsoft C or MASM. It makes an array of the names
- of all the files in the current directory. It than searches
- through the array for files that have an extension of C or
- ASM. If so, it prints a make style "filename.obj: filename.c"
- dependancy line. It then searches through the file to see if
- any local include files are specified. If so, they are also
- specified in the dependancy list. Finally, the link line is
- printed.
-
- Several make macro definitions are also printed. The source
- of these definitions can come from several places. First, a
- set of default definitions are built into the program. Second,
- three environment variables, "CL, LINK, and MASM" are checked
- and any values there become macro definitions. Lastly, a
- configuration file is checked and any definitions there will
- be included. This last set will override any definitions
- set internally or from the environment.
-
- Now for the caveats. 1) THIS THING IS BY NO MEANS PERFECT.
- 2) I have found that it will perform acceptably with little
- to no editing of the generated make file. You may or may not
- find this to be the case. It will be a function of your own
- programming style and needs. 3) It requires that each program
- that you generate a make file for has it's own directory.
- If you do not use a seperate directory for each program, you
- run the risk of having a large number of source and object
- files in your dependancy lists that are not related to the
- program you are trying to make. 4) You get what you pay for.
-
- makemak allows the following flags;
-
- -d show a dependency tree similar to "make' expects
- -s show times. Display last modified times of files.
- -v verbose. Running commentary during file parsing.
- -h,H show a brief list of options
-
- Much of this program is based on an article by Dave Taylor in the February,
- 1988 issue of Computer Language. It has been extensively modified for DOS.
- The getopt function is from Augie Hansen's book "Proficient C".
-
- Compiled under Microsoft C 5.0
- */
-
- /* Last revised : Sun February 21, 1988 at 10:25:36 pm*/
- /* Loran W. Richardson
- 7083 Fairways Drive
- Longmont, CO 80501
- (303) 939-9743
- CIS 70441,3037
- */
-
-